package sadi.client;

import java.awt.GridLayout;
import javax.swing.*;

public class LoginPanel extends JPanel 
{
   private JTextField nameField = new JTextField(15);
   private JPasswordField passwordField = new JPasswordField(15);
   
   public LoginPanel() 
   {
      setLayout(new GridLayout(2, 2, 5, 5)); 
      add(new JLabel("Username:"));
      add(nameField);
      add(new JLabel("Password:"));
      add(passwordField);
   }
   
   public String getName() 
   {
      return nameField.getText();
   }
   
   public String getPassword() 
   {
      return new String(passwordField.getPassword()); 
   }
}
